package javase2.day04;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;


public class Test {
	public static void main(String[] args){
		try {
			byte[] bytes = IOUtils.read("/home/tarena/new.txt");
			System.out.println(Arrays.toString(bytes));
			File file = new File("/home/tarena/new.txt");
			byte[] bytes1 = IOUtils.read(file);
			System.out.println(Arrays.toString(bytes1));
			File file2 = new File("/home/tarena/cp.txt");
			IOUtils.cp(file, file2);
			byte[] utf8 = IOUtils.read(file2);
			String dst = new String(utf8,"gbk");
			System.out.println(dst);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			throw new RuntimeException(e);
		}
	}
}
